package com.demo.springboot;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;

@Configuration
public class DemoConfig {

    @Autowired
    private  Environment env;

    @Value("${app.name}")
    private String name;

    public void show(){
        System.out.println(env.getProperty("app.name")+name);
    }
}
